<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>${pmDataDict.dictName}管理</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        $(document).ready(function () {
            //$("#name").focus();
            $("#inputForm").validate({
                submitHandler: function (form) {
                    loading('正在提交，请稍等...');
                    form.submit();
                },
                errorContainer: "#messageBox",
                errorPlacement: function (error, element) {
                    $("#messageBox").text("输入有误，请先更正。");
                    if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
                        error.appendTo(element.parent().parent());
                    } else {
                        error.insertAfter(element);
                    }
                }
            });
        });
    </script>
</head>
<body>
<ul class="nav nav-tabs">
    <li><a href="${ctx}/pm/pmDataDictItem/list?dictCode=${pmDataDict.dictCode}">${pmDataDict.dictName}列表</a></li>
    <li class="active"><a href="${ctx}/pm/pmDataDictItem/form?id=${pmDataDictItem.id}&dictCode=${pmDataDict.dictCode}">${pmDataDict.dictName}
        <shiro:hasPermission name="pm:pmDataDictItem:edit">${not empty pmDataDictItem.id?'修改':'添加'}</shiro:hasPermission>
        <shiro:lacksPermission name="pm:pmDataDictItem:edit">查看</shiro:lacksPermission></a></li>
</ul>
<br/>
<form:form id="inputForm" modelAttribute="pmDataDictItem" action="${ctx}/pm/pmDataDictItem/save" method="post" class="form-horizontal">
    <form:hidden path="id"/>
    <form:hidden path="dataDictId" value="${pmDataDict.id}"/>
    <form:hidden path="dictCode" value="${pmDataDict.dictCode}"/>
    <sys:message content="${message}"/>
    <div class="control-group">
        <label class="control-label">编号：</label>
        <div class="controls">
            <form:input path="itemCode" htmlEscape="false" maxlength="30" class="input-xlarge required"/>
            <span class="help-inline" style="color:red">*</span>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">名称：</label>
        <div class="controls">
            <form:input path="itemName" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
            <span class="help-inline" style="color:red">*</span>
        </div>
    </div>
    <c:if test="${'Y' == pmDataDict.extAttr1Edit}">
        <div class="control-group">
            <label class="control-label">${pmDataDict.extAttr1Name}：</label>
            <div class="controls">
                <c:if test="${'input' == pmDataDict.extAttr1Type}">
                    <form:input path="extAttr1" htmlEscape="false" maxlength="255" class="input-xlarge " cssClass="${'Y' == pmDataDict.extAttr1Need?'required':''}"/>
                </c:if>
                <c:if test="${'textarea' == pmDataDict.extAttr1Type}">
                    <form:textarea path="extAttr1" htmlEscape="false" rows="4" maxlength="255" class="input-xxlarge" cssClass="${'Y' == pmDataDict.extAttr1Need?'required':''}"/>
                </c:if>
                <c:if test="${'pic' == pmDataDict.extAttr1Type}">
                    <form:hidden id="extAttr1" path="extAttr1" htmlEscape="false" maxlength="255" class="input-xlarge"/>
                    <sys:ckfinder input="extAttr1" type="images" uploadPath="/files/${pmDataDict.dictCode}" selectMultiple="false" maxWidth="100" maxHeight="100"/>
                </c:if>
            </div>
        </div>
    </c:if>
    <c:if test="${'Y' == pmDataDict.extAttr2Edit}">
        <div class="control-group">
            <label class="control-label">${pmDataDict.extAttr2Name}：</label>
            <div class="controls">
                <c:if test="${'input' == pmDataDict.extAttr2Type}">
                    <form:input path="extAttr2" htmlEscape="false" maxlength="255" class="input-xlarge " cssClass="${'Y' == pmDataDict.extAttr2Need?'required':''}"/>
                </c:if>
                <c:if test="${'textarea' == pmDataDict.extAttr2Type}">
                    <form:textarea path="extAttr2" htmlEscape="false" rows="4" maxlength="255" class="input-xxlarge" cssClass="${'Y' == pmDataDict.extAttr2Need?'required':''}"/>
                </c:if>
                <c:if test="${'pic' == pmDataDict.extAttr2Type}">
                    <form:hidden id="extAttr2" path="extAttr2" htmlEscape="false" maxlength="255" class="input-xlarge"/>
                    <sys:ckfinder input="extAttr2" type="images" uploadPath="/files/${pmDataDict.dictCode}" selectMultiple="false" maxWidth="100" maxHeight="100"/>
                </c:if>
            </div>
        </div>
    </c:if>
    <c:if test="${'Y' == pmDataDict.extAttr3Edit}">
        <div class="control-group">
            <label class="control-label">${pmDataDict.extAttr3Name}：</label>
            <div class="controls">
                <c:if test="${'input' == pmDataDict.extAttr3Type}">
                    <form:input path="extAttr3" htmlEscape="false" maxlength="255" class="input-xlarge " cssClass="${'Y' == pmDataDict.extAttr3Need?'required':''}"/>
                </c:if>
                <c:if test="${'textarea' == pmDataDict.extAttr3Type}">
                    <form:textarea path="extAttr3" htmlEscape="false" rows="4" maxlength="255" class="input-xxlarge" cssClass="${'Y' == pmDataDict.extAttr3Need?'required':''}"/>
                </c:if>
                <c:if test="${'pic' == pmDataDict.extAttr3Type}">
                    <form:hidden id="extAttr3" path="extAttr3" htmlEscape="false" maxlength="255" class="input-xlarge"/>
                    <sys:ckfinder input="extAttr3" type="images" uploadPath="/files/${pmDataDict.dictCode}" selectMultiple="false" maxWidth="100" maxHeight="100"/>
                </c:if>
            </div>
        </div>
    </c:if>
    <c:if test="${'Y' == pmDataDict.extAttr4Edit}">
        <div class="control-group">
            <label class="control-label">${pmDataDict.extAttr4Name}：</label>
            <div class="controls">
                <c:if test="${'input' == pmDataDict.extAttr4Type}">
                    <form:input path="extAttr4" htmlEscape="false" maxlength="255" class="input-xlarge " cssClass="${'Y' == pmDataDict.extAttr4Need?'required':''}"/>
                </c:if>
                <c:if test="${'textarea' == pmDataDict.extAttr4Type}">
                    <form:textarea path="extAttr4" htmlEscape="false" rows="4" maxlength="255" class="input-xxlarge" cssClass="${'Y' == pmDataDict.extAttr4Need?'required':''}"/>
                </c:if>
                <c:if test="${'pic' == pmDataDict.extAttr4Type}">
                    <form:hidden id="extAttr4" path="extAttr4" htmlEscape="false" maxlength="255" class="input-xlarge"/>
                    <sys:ckfinder input="extAttr4" type="images" uploadPath="/files/${pmDataDict.dictCode}" selectMultiple="false" maxWidth="100" maxHeight="100"/>
                </c:if>
            </div>
        </div>
    </c:if>
    <c:if test="${'Y' == pmDataDict.extAttr5Edit}">
        <div class="control-group">
            <label class="control-label">${pmDataDict.extAttr5Name}：</label>
            <div class="controls">
                <c:if test="${'input' == pmDataDict.extAttr5Type}">
                    <form:input path="extAttr5" htmlEscape="false" maxlength="255" class="input-xlarge " cssClass="${'Y' == pmDataDict.extAttr5Need?'required':''}"/>
                </c:if>
                <c:if test="${'textarea' == pmDataDict.extAttr5Type}">
                    <form:textarea path="extAttr5" htmlEscape="false" rows="4" maxlength="255" class="input-xxlarge" cssClass="${'Y' == pmDataDict.extAttr5Need?'required':''}"/>
                </c:if>
                <c:if test="${'pic' == pmDataDict.extAttr5Type}">
                    <form:hidden id="extAttr5" path="extAttr5" htmlEscape="false" maxlength="255" class="input-xlarge"/>
                    <sys:ckfinder input="extAttr5" type="images" uploadPath="/files/${pmDataDict.dictCode}" selectMultiple="false" maxWidth="100" maxHeight="100"/>
                </c:if>
            </div>
        </div>
    </c:if>
    <c:if test="${'Y' == pmDataDict.extAttr6Edit}">
        <div class="control-group">
            <label class="control-label">${pmDataDict.extAttr6Name}：</label>
            <div class="controls">
                <c:if test="${'input' == pmDataDict.extAttr6Type}">
                    <form:input path="extAttr6" htmlEscape="false" maxlength="255" class="input-xlarge " cssClass="${'Y' == pmDataDict.extAttr6Need?'required':''}"/>
                </c:if>
                <c:if test="${'textarea' == pmDataDict.extAttr6Type}">
                    <form:textarea path="extAttr6" htmlEscape="false" rows="4" maxlength="255" class="input-xxlarge" cssClass="${'Y' == pmDataDict.extAttr6Need?'required':''}"/>
                </c:if>
                <c:if test="${'pic' == pmDataDict.extAttr6Type}">
                    <form:hidden id="extAttr6" path="extAttr6" htmlEscape="false" maxlength="255" class="input-xlarge"/>
                    <sys:ckfinder input="extAttr6" type="images" uploadPath="/files/${pmDataDict.dictCode}" selectMultiple="false" maxWidth="100" maxHeight="100"/>
                </c:if>
            </div>
        </div>
    </c:if>
    <c:if test="${'Y' == pmDataDict.extAttr7Edit}">
        <div class="control-group">
            <label class="control-label">${pmDataDict.extAttr7Name}：</label>
            <div class="controls">
                <c:if test="${'input' == pmDataDict.extAttr7Type}">
                    <form:input path="extAttr7" htmlEscape="false" maxlength="255" class="input-xlarge " cssClass="${'Y' == pmDataDict.extAttr7Need?'required':''}"/>
                </c:if>
                <c:if test="${'textarea' == pmDataDict.extAttr7Type}">
                    <form:textarea path="extAttr7" htmlEscape="false" rows="4" maxlength="255" class="input-xxlarge" cssClass="${'Y' == pmDataDict.extAttr7Need?'required':''}"/>
                </c:if>
                <c:if test="${'pic' == pmDataDict.extAttr7Type}">
                    <form:hidden id="extAttr7" path="extAttr7" htmlEscape="false" maxlength="255" class="input-xlarge"/>
                    <sys:ckfinder input="extAttr7" type="images" uploadPath="/files/${pmDataDict.dictCode}" selectMultiple="false" maxWidth="100" maxHeight="100"/>
                </c:if>
            </div>
        </div>
    </c:if>
    <div class="control-group">
        <label class="control-label">排序：</label>
        <div class="controls">
            <form:input path="sort" htmlEscape="false" maxlength="11" class="input-xlarge " placeholder="默认自动排序"/>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">备注：</label>
        <div class="controls">
            <form:textarea path="remarks" htmlEscape="false" rows="4" maxlength="255" class="input-xxlarge "/>
        </div>
    </div>
    <div class="form-actions">
        <shiro:hasPermission name="pm:pmDataDictItem:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
        <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
    </div>
</form:form>
</body>
</html>